//
//  UserManagerV2.h
//  EnvironmentalProtection
//
//  Created by HCreater on 2018/11/11.
//  Copyright © 2018年 HCreater. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "UserInfoData.h"
#import "ExpertDetailInfoData.h"
#import "EnterpriseDetailInfoData.h"
#import "InstitutionDetailInfoData.h"
#import "UserCenterInfoData.h"
#import "UserDetailData.h"

@interface UserManagerV2 : NSObject

MHSingletonH(UserManagerV2);

extern NSString* UM_appLanguageV2;

@property (nonatomic, readonly, strong) UserInfoData* userData;
@property (nonatomic, readonly, strong) UserDetailData* userDetailData;
@property (nonatomic, readonly, strong) ExpertDetailInfoData* expertData;
@property (nonatomic, readonly, strong) EnterpriseDetailInfoData* enterpriseData;
@property (nonatomic, readonly, strong) InstitutionDetailInfoData* institutionData;
@property (nonatomic, readonly, strong) UserCenterInfoData* userCenterInfoData;

@property (nonatomic, readonly, assign) NSInteger unReadMsgNum;

- (void)userDataRefresh;

- (void)clean;

- (void)updateUserToken:(NSString*)userID;
- (void)saveUserData:(UserInfoData*)userData;

- (BOOL)isLogined;
- (BOOL)isHaveUserToken;

- (void)tryLogin;
- (void)logonOut;

- (void)updateUserInfo;

- (void)cleanUnReadMsg;

@end
